<template>
  <div class="company-container">
    <el-alert
      title="对公司名称、公司地址、营业执照、公司地区的更新，将使得公司资料被重新审核，请谨慎修改"
      type="info"
      show-icon
    >
    </el-alert>
    <el-form class="form" ref="form" :model="form" label-width="80px">
      <el-form-item label="公司名称">
        <el-input v-model="form.name" disabled></el-input>
      </el-form-item>
      <el-form-item label="公司地址">
        <el-input v-model="form.companyAddress" disabled></el-input>
      </el-form-item>
      <el-form-item label="公司邮箱">
        <el-input v-model="form.mailbox" disabled></el-input>
      </el-form-item>
      <el-form-item label="备注">
        <el-input type="textarea" v-model="form.remarks" disabled></el-input>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { getCompanyInfo } from '@/api/setting'
export default {
  data() {
    return {
      form: {
        name: '',
        companyAddress: '',
        mailbox: '',
        remarks: ''
      },
    };
  },
  created() {
    this.initData()
  },
  methods: {
    async initData() {
      this.form = await getCompanyInfo(this.$store.getters.companyId)
    }
  }
}
</script>

<style lang="scss">
.company-container {
  .form {
    margin-top: 20px;
    .el-input {
      width: 500px;
    }
    .el-textarea {
      width: 500px;
    }
  }
}
</style>